package com.geeklan.smart.data.remote.device;

import com.geeklan.smart.data.model.ApiResponse;
import com.geeklan.smart.data.model.Device;
import com.geeklan.smart.data.model.DeviceId;
import com.geeklan.smart.data.model.DeviceList;
import com.geeklan.smart.data.model.DeviceStatusResponse;
import com.geeklan.smart.data.model.DeviceVersion;
import com.geeklan.smart.data.model.Feed;
import com.geeklan.smart.data.model.FeedPlan;
import com.geeklan.smart.data.model.FeedingRecord;
import com.geeklan.smart.data.model.RequestDevice;
import com.geeklan.smart.data.model.RequestDeviceUpdate;
import com.geeklan.smart.data.model.RequestFoodBowl;
import com.geeklan.smart.data.model.TokenResponse;
import com.geeklan.smart.data.model.UploadDeviceVideoImg;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface DeviceApiService {
    @GET("your_endpoint")
    Call<Device> sendCMD(@Query("param") String param);

    @POST("device/resetFeedNum")
    Call<ApiResponse> resetFeedNum(@Body FeedPlan feedPlan);

    @POST("device/controlOpenFeed")
    Call<ApiResponse> controlOpenFeed(@Body Feed feed);

    @POST("device/getDeviceAccessToken")
    Call<ApiResponse<TokenResponse>> getDeviceAccessToken(@Body RequestDevice requestDevice);

    @POST("device/bindUserDevice")
    Call<ApiResponse> bindUserDevice(@Body Device device);

    @POST("device/getDeviceById")
    Call<DeviceStatusResponse> getDeviceById(@Body RequestDevice requestDevice);

    @POST("device/getUserDevice")
    Call<DeviceList> getUserDevice();

    @POST("device/deleteUserBindDevice")
    Call<ApiResponse> deleteUserBindDevice(@Body Device device);
    @POST("device/updateDeviceInfo")
    Call<ApiResponse> updateDeviceInfo(@Body Device device);
    @POST("device/clearBowl")
    Call<ApiResponse> clearBowl(@Body Device device);
    @POST("device/resetDevice")
    Call<ApiResponse> resetDevice(@Body Device device);

    @POST("device/sendGetLogCommand")
    Call<ApiResponse> sendGetLogCommand(@Body DeviceId device);

    @POST("device/IntelligentFoodBowl")
    Call<ApiResponse> intelligentFoodBowl(@Body RequestFoodBowl requestFoodBowl);

    @POST("device/firmwareUpgrade")
    Call<ApiResponse> firmwareUpgrade(@Body RequestDeviceUpdate requestDeviceUpdate);

    @POST("device/uploadDeviceVideoImg")
    Call<ApiResponse> uploadDeviceVideoImg(@Body UploadDeviceVideoImg uploadDeviceVideoImg);

    @GET("device/getDeviceVersion")
    Call<ApiResponse<List<DeviceVersion>>> getDeviceVersion(@Query("limit") int limit, @Query("page") int page, @Query("type") int type, @Query("readFlag") int readFlag);

    @GET("record/getFeedingRecordList")
    Call<ApiResponse<List<FeedingRecord>>> getFeedingRecordList(@Query("deviceId") String deviceId,@Query("dateDay") String dateDay);

    @GET("record/getMonthFeedingRecord")
    Call<ApiResponse<List<String>>> getMonthFeedingRecord(@Query("deviceId") String deviceId,@Query("month") String month);
}

